package Operation;

import Book.BookList;

import Book.Book;

public class ShowOperation implements IOOperation{
    @Override
    public void work(BookList bookList) {
        System.out.println("展示所有书籍");
        int currentSize = bookList.getUsedSize();
        if (currentSize == 0) {
            System.out.println("暂时没有书籍!");
        }
        for (int i = 0; i < currentSize; i++) {
            Book book = bookList.getBook(i);
            System.out.println(book);
        }

    }
}
